package cn.chinaunicom.kafka;

import cn.chinaunicom.kafka.producer.ProductKafka;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
class KafkaDemoProducer {

    @Autowired
    private ProductKafka productKafka;


    @Test
    public void productTest() throws Exception{
        for (int i=0;i<1000;i++){
            productKafka.send("mysons","myson "+i+" hello-2020-03-20");
            Thread.sleep(500);
        }
    }

}
